
package com.sx.core.dialects;

import com.alibaba.druid.sql.PagerUtils;


/**
 * TODO: DOCUMENT ME!
 *
 * @author   <a href="mailto:lihao@ozstrategy.com">Hao Li</a>
 * @version  06/15/2017 22:12
 */
public class MySqlDialect implements Dialect {
  //~ Methods ----------------------------------------------------------------------------------------------------------

  /**
   * @see  com.rdandelion.webapp.dialects.Dialect#buildPaginationSql(String, int, int)
   */
  @Override public String buildPaginationSql(String originalSql, int offset, int limit) {
    return PagerUtils.limit(originalSql, getType(), offset, limit);
  }

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * @see  com.rdandelion.webapp.dialects.Dialect#getType()
   */
  @Override public String getType() {
    return MYSQL;
  }

}
